package com.itheima.health.dao;

import com.github.pagehelper.Page;
import com.itheima.health.pojo.Setmeal;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import java.util.List;

@Mapper
public interface SetmealDao {
    public Page<Setmeal> findPage(String queryString);

    @Options(useGeneratedKeys = true,keyProperty = "id")
    @Insert("INSERT INTO itcast_health_personal_combat.t_setmeal (name, code, helpCode, sex, age, price, remark, attention, img) " +
            "VALUES (#{name}, #{code}, #{helpCode}, #{sex}, #{age}, #{price}, #{remark}, #{attention}, #{img})")
    void add(Setmeal setmeal);



    @Insert("insert into t_setmeal_checkgroup values (#{id},#{checkgroupId})")
    void addcheckgroupId(Integer id, String checkgroupId);
}
